package com.example.juc.big_talk_concurrent.chapter3.article2;

import java.util.concurrent.atomic.AtomicInteger;

public class AtomicIntegerTest {
    static AtomicInteger a = new AtomicInteger(1);

    public static void main(String[] args) {
        System.out.println(a.getAndIncrement()); // 输出 1
        System.out.println(a.get()); // 输出 2
    }
}

